﻿using System.ComponentModel.DataAnnotations;

namespace WebAPI.Util;


public class BasePageInput
{
    /// <summary>
    /// 当前页码
    /// </summary>
    public virtual int Page { get; set; } = 1;

    /// <summary>
    /// 页码容量
    /// </summary>
    [Range(0, 100, ErrorMessage = "页码容量超过最大限制")]
    public virtual int PageSize { get; set; } = 20;

    /// <summary>
    /// 排序字段
    /// </summary>
    public virtual string? Field { get; set; } = "CreateDate";

    /// <summary>
    /// 排序方向
    /// </summary>
    public virtual string? Order { get; set; } = "desc";

}
